package com.cjkj.system.api;

import com.cjkj.common.core.constant.ServiceNameConstants;
import com.cjkj.common.core.domain.R;
import com.cjkj.system.api.domain.APIWarnHandle;
import com.cjkj.system.api.domain.APIWarnRecords;
import com.cjkj.system.api.domain.request.WarnListReq;
import com.cjkj.system.api.domain.request.WarnRecordReq;
import com.cjkj.system.api.factory.RemoteWarnFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(contextId = "remoteWarnService",value = ServiceNameConstants.EQUIPMENT_SERVICE,fallbackFactory = RemoteWarnFallbackFactory.class )
public interface RemoteWarnService {
    @PostMapping("/warn/list")
    R<APIWarnRecords> listWarn(@RequestBody WarnListReq req);
    /**
     * 根据预警ID处理异常
     **/
    @PostMapping("/warn/handle")
    R<Boolean> handleWarns(@RequestBody List<APIWarnHandle> apiWarnHandleList);
    /**
     * 根据就诊号处理异常
     **/
    @PostMapping("/warn/handle/visitNo")
    R<Boolean> handleWarns(@RequestBody WarnRecordReq req);
    /**
     * 根据就诊号查询预警列表
     **/
    @GetMapping("/warn/list/{visitNo}")
    R<APIWarnRecords> listWarns(@PathVariable("visitNo") Long visitNo, @RequestParam("expectOutTime") String expectOutTime);
}
